#include<bits/stdc++.h>
using namespace std;
const int N=1e5+5;
int n;
int t[N];
int r[N];
//duel
int cnt;
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%d",&n);
    for(int i=1;i<=n;i++){
        scanf("%d",&r[i]);
        t[r[i]]++;
    }
    sort(r+1,r+1+n);
    int a,b;
    a=1;
    b=1;
    while(b!=n+1){
        if(r[a]==r[b]){
            b++;
            continue;
        }
        a++,b++;
        cnt++;
    }
    printf("%d\n",n-cnt);
    return 0;
}
